using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_PropertyFloat_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.PropertyFloat);

            field = type.GetField("StartValue", flag);
            app.RegisterCLRFieldGetter(field, get_StartValue_0);
            app.RegisterCLRFieldSetter(field, set_StartValue_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_StartValue_0, AssignFromStack_StartValue_0);
            field = type.GetField("EndValue", flag);
            app.RegisterCLRFieldGetter(field, get_EndValue_1);
            app.RegisterCLRFieldSetter(field, set_EndValue_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_EndValue_1, AssignFromStack_EndValue_1);
            field = type.GetField("Delay", flag);
            app.RegisterCLRFieldGetter(field, get_Delay_2);
            app.RegisterCLRFieldSetter(field, set_Delay_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Delay_2, AssignFromStack_Delay_2);
            field = type.GetField("Time", flag);
            app.RegisterCLRFieldGetter(field, get_Time_3);
            app.RegisterCLRFieldSetter(field, set_Time_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Time_3, AssignFromStack_Time_3);


            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.PropertyFloat[s]);

            args = new Type[]{typeof(System.Object), typeof(System.String)};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_StartValue_0(ref object o)
        {
            return ((huqiang.PropertyFloat)o).StartValue;
        }

        static StackObject* CopyToStack_StartValue_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.PropertyFloat)o).StartValue;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_StartValue_0(ref object o, object v)
        {
            ((huqiang.PropertyFloat)o).StartValue = (System.Single)v;
        }

        static StackObject* AssignFromStack_StartValue_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @StartValue = *(float*)&ptr_of_this_method->Value;
            ((huqiang.PropertyFloat)o).StartValue = @StartValue;
            return ptr_of_this_method;
        }

        static object get_EndValue_1(ref object o)
        {
            return ((huqiang.PropertyFloat)o).EndValue;
        }

        static StackObject* CopyToStack_EndValue_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.PropertyFloat)o).EndValue;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_EndValue_1(ref object o, object v)
        {
            ((huqiang.PropertyFloat)o).EndValue = (System.Single)v;
        }

        static StackObject* AssignFromStack_EndValue_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @EndValue = *(float*)&ptr_of_this_method->Value;
            ((huqiang.PropertyFloat)o).EndValue = @EndValue;
            return ptr_of_this_method;
        }

        static object get_Delay_2(ref object o)
        {
            return ((huqiang.PropertyFloat)o).Delay;
        }

        static StackObject* CopyToStack_Delay_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.PropertyFloat)o).Delay;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Delay_2(ref object o, object v)
        {
            ((huqiang.PropertyFloat)o).Delay = (System.Single)v;
        }

        static StackObject* AssignFromStack_Delay_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Delay = *(float*)&ptr_of_this_method->Value;
            ((huqiang.PropertyFloat)o).Delay = @Delay;
            return ptr_of_this_method;
        }

        static object get_Time_3(ref object o)
        {
            return ((huqiang.PropertyFloat)o).Time;
        }

        static StackObject* CopyToStack_Time_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.PropertyFloat)o).Time;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Time_3(ref object o, object v)
        {
            ((huqiang.PropertyFloat)o).Time = (System.Single)v;
        }

        static StackObject* AssignFromStack_Time_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Time = *(float*)&ptr_of_this_method->Value;
            ((huqiang.PropertyFloat)o).Time = @Time;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @PropertyName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Object @cla = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = new huqiang.PropertyFloat(@cla, @PropertyName);

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
